package com.bsoft.gol.hcs.satisfyStatic.dao;

import ctd.persistence.annotation.DAOMethod;
import ctd.persistence.annotation.DAOParam;
import ctd.persistence.support.hibernate.HibernateSupportDelegateDAO;
import com.bsoft.gol.hcs.satisfyStatic.entity.OdsSatisfyStatisticExtra;

import java.util.List;

/**
 * Created by ChenJij on 2022/7/26.
 */
public abstract class OdsSatisfyStatisticExtraDAO extends HibernateSupportDelegateDAO<OdsSatisfyStatisticExtra> {
    public OdsSatisfyStatisticExtraDAO() {
        this.setKeyField("statisticExtraId");
    }

    @DAOMethod(sql = " delete from OdsSatisfyStatisticExtra where settingId=:settingId ")
    public abstract void deleteAllBySettingId(@DAOParam("settingId") String settingId);


    @DAOMethod(sql = "from OdsSatisfyStatisticExtra where settingId=:settingId order by sort asc")
    public abstract List<OdsSatisfyStatisticExtra> queryBySettingId(@DAOParam("settingId") String settingId);

    @DAOMethod(sql = "from OdsSatisfyStatisticExtra where settingId=:settingId and statisticExtraType=:statisticExtraType order by sort asc")
    public abstract List<OdsSatisfyStatisticExtra> queryBySettingIdAndStatisticExtraType(@DAOParam("settingId") String settingId,@DAOParam("statisticExtraType") String statisticExtraType);


}